<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>tlineto</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="tival.html" title="tival" />
    <link rel="next" href="tone.html" title="tone" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">tlineto</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="tival.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="tone.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="tlineto"></a>
      <div class="titlepage"></div>
      <a id="IndexTlineto" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">tlineto</span>
        </h2>
        <p>tlineto — 
      Generate glissandos starting from a control signal.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp158650464"></a>
        <h2>Description</h2>
        <p>
      Generate glissandos starting from a control signal with a trigger.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp158651648"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">kres <span class="command"><strong>tlineto</strong></span> ksig, ktime, ktrig</pre>
      </div>
      <div class="refsect1">
        <a id="idp158716416"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>kres</em></span> -- Output signal.
    </p>
        <p>
      <span class="emphasis"><em>ksig</em></span> -- Input signal.
    </p>
        <p>
      <span class="emphasis"><em>ktime</em></span> -- Time length of glissando in seconds.
    </p>
        <p>
      <span class="emphasis"><em>ktrig</em></span> -- Trigger signal.
    </p>
        <p>
      <span class="emphasis"><em>tlineto</em></span> is similar to <a class="link" href="lineto.html" title="lineto"><em class="citetitle">lineto</em></a> but can be applied to any kind of signal (not only stepped signals) without producing discontinuities.  Last value of each segment is sampled and held from input signal each time <span class="emphasis"><em>ktrig</em></span> value is set to a nonzero value. Normally <span class="emphasis"><em>ktrig</em></span> signal consists of a sequence of zeroes (see <a class="link" href="trigger.html" title="trigger"><em class="citetitle">trigger opcode</em></a>).
    </p>
        <p>
      The effect of glissando is quite different from <a class="link" href="port.html" title="port"><em class="citetitle">port</em></a>. Since in these cases, the lines are straight. Also the context of usage is different.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp158725904"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the tlineto opcode. It uses the file <a class="ulink" href="examples/tlineto.csd" target="_top"><em class="citetitle">tlineto.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp158727760"></a>
          <p class="title">
            <strong>Example 933. Example of the tlineto opcode.</strong>
          </p>
          <div class="example-contents">
            <p>See the sections <a class="link" href="UsingRealTime.html" title="Real-Time Audio"><em class="citetitle">Real-time Audio</em></a> and <a class="link" href="CommandFlags.html" title="Csound command line"><em class="citetitle">Command Line Flags</em></a> for more information on using command line flags.</p>
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
<span class="comment">; Select audio/midi flags here according to platform</span>
-odac      <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">; -o tlineto.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="ohdr">sr</span> <span class="op">=</span> 44100
<span class="ohdr">ksmps</span> <span class="op">=</span> 32
<span class="ohdr">nchnls</span> <span class="op">=</span> 2
<span class="ohdr">0dbfs</span>  <span class="op">=</span> 1

giSine <span class="ohdr">ftgen</span> 0, 0, 2^10, 10, 1

<span class="oblock">instr</span> 1


kmtr <span class="opc">lfo</span> 1, .5, 1			<span class="comment">;produce trigger signal			</span>
ktr  <span class="opc">trigger</span> kmtr, .5, 0		<span class="comment">;with triangle wave</span>

ktime <span class="op">=</span> p4				
kfreq <span class="opc">randh</span> 1000, 3, .2, 0, 500		<span class="comment">;generate random values</span>
kfreq <span class="opc">tlineto</span> kfreq, ktime, ktr		<span class="comment">;different glissando times</span>
aout  <span class="opc">poscil</span> .4, kfreq, giSine
      <span class="opc">outs</span> aout, aout

<span class="oblock">endin</span>
<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>

<span class="stamnt">i</span> 1 0 10 .2	<span class="comment">;short glissando</span>
<span class="stamnt">i</span> 1 11 10 .8	<span class="comment">;longer glissande</span>
<span class="stamnt">e</span>
<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1">
        <a id="idp158732048"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="lineto.html" title="lineto"><em class="citetitle">lineto</em></a>
    </p>
      </div>
      <div class="refsect1">
        <a id="idp158734096"></a>
        <h2>Credits</h2>
        <p>Author: Gabriel Maldonado</p>
        <p>New in Version 4.13</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="tival.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="tone.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">tival </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> tone</td>
        </tr>
      </table>
    </div>
  </body>
</html>
